#ifndef RELAY_H
#define RELAY_H

#include <QList>
#include <QString>

#define RELAY_STATUS_OFF        0x00
#define RELAY_STATUS_ON         0x01
#define RELAY_STATUS_AIR        0x02
#define RELAY_STATUS_COOLING    0x03
#define RELAY_STATUS_HEATING    0x04

#define RELAY_STATUS_PENDING    0x20    // pending or shutdown
#define RELAY_STATUS_UNKNOWN    0x40
#define RELAY_STATUS_NOTUSED    0x80

#define REMOTE_VENDOR_LG        0x00
#define REMOTE_VENDOR_CARRIER   0x01
#define REMOTE_VENDOR_SAMSUNG   0x02

class Relay
{
public:
    Relay();

public:
    quint8 mId;
    QString mName;
    quint8 mNotUsed;
    int mDelayAction;   // relay(push), remote(adcCheck)

    int mIdRemote;      // bid*100 + rid
    int mSmsFlag;       // 0x0(no Send), 0x1(off Send), 0x2(on Send)
    int mFlagRemote;    // 0x0(off-on-cooling/heating-air), 0x1(off-on-cooling/heating)
    QString mSmsOff;    //
    QString mSmsOn;    //

    int mIdRelay;       // bid*100 + rid
    int mRemoteVendor;  // LG(0), CARRIER(1), SAMSUNG(2)
    int mRemoteAirMin;  // 0 ~ 20000 [mA]
    int mRemoteAirMax;  // 0 ~ 20000 [mA]
    int mRemoteCoolingMin;  // 0 ~ 20000 [mA]
    int mRemoteCoolingMax;  // 0 ~ 20000 [mA]

    quint8 mStatus;
    int mCurrent;

    int mTimerId;
};

#endif // RELAY_H
